/*
 * Flotta.hh
 *
 *  Created on: 2009.12.13.
 *      Author: zsanka
 */

#ifndef FLOTTA_HH_
#define FLOTTA_HH_
# include "Gui.hh"
# include "../Network/StateChanged.hh"
# include <QtGui>

class Gui::Flotta: public QWidget {
	Q_OBJECT

	protected: QString playername;

	protected: bool selected;

	public: Network::StateChanged::FleetInfo const fi;

	protected: static QImage img;

	public: explicit Flotta(
	  QWidget* parent, Network::StateChanged::FleetInfo fi, QString pl
	);

	protected: virtual void paintEvent(QPaintEvent* ev);

	protected: virtual void mousePressEvent(QMouseEvent* ev);

	public: void select();
	public: void deselect();
	public: u8 get_id() const;
	public: QString get_player() const;

	signals: void left_clicked(Flotta*);
	signals: void right_clicked(Flotta*);
};

#endif /* FLOTTA_HH_ */
